//
//  WDJHttpHelper.m
//  wdj
//
//  Created by 蓝鳍互娱 on 2024/7/9.
//

#import "WDJHttpHelper.h"
#import "WDJNetHelper.h"
@implementation WDJHttpHelper
static WDJHttpHelper *defaultManager = nil;
 + (WDJHttpHelper*)defaultRequest{
     static dispatch_once_t token;
     dispatch_once(&token, ^{
         if(defaultManager == nil){
             defaultManager = [[WDJHttpHelper alloc] init];
         }
     });
     return defaultManager;
}
//vip价格
+ (void)wdjMakeVipPrice{
    WeakSelf
    NSDictionary *parmDic = @{@"packageName":[WDjWholeData wdjPublicForBundId]};
    [[WDJNetHelper defaultRequest] netPost:[WDjWholeData wdjUrlForVipPrice] param:parmDic success:^(id  _Nonnull data) {
        NSDictionary * dataDic = data[@"data"];
        [WDJPublicData defaultManager].wdjVipPrice = [dataDic objectForKey:@"price"];
    } fail:^{
        [weakSelf wdjMakeVipPrice];
    }];
}
//VIP支付埋点
+ (void)wdjMakePayDian{
    NSMutableDictionary *parmDic = [[NSMutableDictionary alloc] init];
    [parmDic setObject:@"汝伊温度计" forKey:@"name"];
    if([WDJPublicData defaultManager].wdjVipPrice){
        [parmDic setObject:[WDJPublicData defaultManager].wdjVipPrice forKey:@"price"];
    }
    NSString *udid = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
    [parmDic setObject:[NSString stringWithFormat:@"%@",udid] forKey:@"udid"];
    [[WDJNetHelper defaultRequest] netPost:[WDjWholeData wdjUrlForMaiDian] param:parmDic success:^(id  _Nonnull data) {
    } fail:^{
    }];
}
@end
